﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Water : Nature
{
	Transform top, bottom;
	private void Start() {
		top = transform.Find("water-top");
		bottom = transform.Find("water-bottom");
	}


	private void OnTriggerEnter2D(Collider2D other) {
		if (other.gameObject.tag == "Player") {
			other.GetComponent<Player>().OnEnterSwimming();
		}
	}

	private void OnTriggerExit2D(Collider2D other) {
		if (other.gameObject.tag == "Player") {
			other.GetComponent<Player>().OnExitSwimming();
		}
	}
}
